<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 50px;
            height: 50px;
            background: lightblue;
            margin: 10px;
        }
        #b1{
            background: blue;
            float: left;
        }
        #b2{
            float: right;
        }
        /* #boxcontainer:after{
            content: "";
            clear: both;
            display: block;
        } */
    </style>
</head>
<body>
    <div id="boxcontainer">
        <div class="box" id="b1"></div>
        <div class="box" id="b2"></div>
        <div style="clear: both; height: 0px;"></div>
    </div>
</body>
</html>